#ifndef SPHERE_HPP__  
#define SPHERE_HPP__  
  
#include "Circle.hpp"  
  
template <typename T>  
class Sphere : public Circle<T>  
{  
public:  
    Sphere(T centerZ, T centerX, T centerY, T radius, eColor color);  
    Sphere(T radius);  
    Sphere();  
  
    T surfaceArea();  
    T volume();  
    T getZ();  
  
private:  
    T z;  
};  
  
template <typename T>  
Sphere<T>::Sphere(T _x, T _y, T _z, T _radius, eColor _color)  
: Circle<T>::Circle (_x, _y, _radius, _color)  
{  
    this->z = _z;  
}  
  
template <typename T>  
Sphere<T>::Sphere(T _radius)  
: Circle<T>::Circle (_radius)  
{  
    this->x = const_cast<T>(0);  
    this->y = const_cast<T>(0);  
    this->z = const_cast<T>(0);  
    this->radius = _radius;  
}  
  
template <typename T>  
Sphere<T>::Sphere()  
{  
    this->x = const_cast<T>(0);  
    this->y = const_cast<T>(0);  
    this->z = const_cast<T>(0);  
    this->radius = const_cast<T>(1);  
}  
  
template <typename T>  
T Sphere<T>::surfaceArea()  
{  
    return const_cast<T>(4) * M_PI * this->radius * this->radius;  
}  
  
template <typename T>  
T Sphere<T>::volume()  
{  
    T three = 3;  
    T four  = 4;  
    return four * M_PI * this->radius * this->radius * this->radius / three;  
}  
#endif  